import java.util.Scanner;

public class InsertSort {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = sc.nextInt();
        }
        //{324,6,2,683,12,69,23}
        //{6,324,2,683,12,69,23}
        //{2,6,324,683,12,69,23}
        //{2,6,324,683,12,69,23}
        //{2,6,12,23,69,324,683}
        insertSort(arr);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }

    public static void insertSort(int[] arr) {

        //i是后面的
        for (int i = 1; i < arr.length; i++) {
            int index = -1;
            //j是前面的
            for (int j = i - 1; j >= 0; j--) {
                if (arr[j] < arr[i]) {
                    index = j;
                    break;
                }
            }
            //
            int temp = arr[i];
            for (int j = i - 1; j > index; j--) {
                arr[j + 1] = arr[j];
            }
            arr[index + 1] = temp;
        }
    }
}
